import React from 'react';
import Layout from '../../../src/components/layout/Layout';
import Challenge from '../../../src/components/pages/phases/Challenge';
import { RingProps } from '../../../src/model/components/ring';
import getServerSidePropsRing from '../../../src/utils/ssr/getServerSidePropsRing';

const challenge: React.FC<RingProps> = ({ ring, user }) => (
  <Layout title="Reto" mainClassName="phasePage">
    <Challenge ring={ring} user={user} />
  </Layout>
);

export const getServerSideProps = getServerSidePropsRing;

export default challenge;
